Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Draw State Terminology #41

Merged
merged 2 commits into from
Jun 30, 2023
Merged

New Draw State Terminology #41

merged 2 commits into from
Jun 30, 2023

Conversation

dylandesrosier
Copy link
Contributor

Updates the language around the state of draws to be "Closed" and "Open" rather than "Completed" and "Next". The "current" draw is open, all others are closed. When we close the open draw and open the next, we "transition" draws.

@github-actions
Copy link

LCOV of commit d883710 during Tests with 100% Coverage #230

Summary coverage rate:
  lines......: 99.5% (556 of 559 lines)
  functions..: 100.0% (84 of 84 functions)
  branches...: no data found

Files changed coverage rate:
                                             |Lines       |Functions  |Branches    
  Filename                                   |Rate     Num|Rate    Num|Rate     Num
  =================================================================================
  src/PrizePool.sol                          |99.3%    138| 100%    37|    -      0
  src/abstract/TieredLiquidityDistributor.sol|99.3%    298| 100%    25|    -      0
  src/libraries/DrawAccumulatorLib.sol       | 100%     98| 100%    12|    -      0

⛔ The code coverage is too low. Expected at least 100.

/// @notice Returns the start time of the draw for the next successful completeAndStartNextDraw
function _nextDrawStartsAt() internal view returns (uint64) {
return _nextDrawEndsAt() - drawPeriodSeconds;
/// @notice Returns the start time of the draw for the next successful closeAndStartNextDraw
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be transitionDraws.

uint256 winningRandomNumber_
) external onlyDrawManager returns (uint16) {
/// @return The ID of the closed draw
function transitionDraws(uint256 winningRandomNumber_) external onlyDrawManager returns (uint16) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure we should convey that this function also starts the next Draw, it's kinda implied.
I feel like completeDraw or awardDraw would be enough.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I originally changed it to just closeDraw but I figured I should retain the message that was conveyed by the old name. I'll change it back to closeDraw.

@dylandesrosier dylandesrosier merged commit 4cbd0db into main Jun 30, 2023
0 of 2 checks passed
@github-actions
Copy link

LCOV of commit fc8e114 during Tests with 100% Coverage #232

Summary coverage rate:
  lines......: 99.5% (556 of 559 lines)
  functions..: 100.0% (84 of 84 functions)
  branches...: no data found

Files changed coverage rate:
                                             |Lines       |Functions  |Branches    
  Filename                                   |Rate     Num|Rate    Num|Rate     Num
  =================================================================================
  src/PrizePool.sol                          |99.3%    138| 100%    37|    -      0
  src/abstract/TieredLiquidityDistributor.sol|99.3%    298| 100%    25|    -      0
  src/libraries/DrawAccumulatorLib.sol       | 100%     98| 100%    12|    -      0

⛔ The code coverage is too low. Expected at least 100.

@dylandesrosier dylandesrosier deleted the open-and-closed-draws branch June 30, 2023 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants